//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { CmsComments, CmsCommentsResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooCmsCommentsList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<CmsCommentsResponse>(`/uctoo/cms_comments/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooCmsComments = async (id: string) => {
  return requestClient.get<CmsComments>(`/uctoo/cms_comments/${id}`);
};

export const adductooCmsComments = async (data: Partial<CmsComments>) => {
  return requestClient.post<CmsComments>('/uctoo/cms_comments/add', data);
};

export const edituctooCmsComments = async (data: Partial<CmsComments>) => {
  return requestClient.post<CmsComments>('/uctoo/cms_comments/edit', data);
};

export const deleteuctooCmsComments = async (id: string) => {
  return requestClient.post<any>('/uctoo/cms_comments/del', { id });
};
